//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================
#ifndef __ELA_SPIN_LOCK_H__
#define __ELA_SPIN_LOCK_H__

#include "jffs2_macro.h"

#define ELA_UNUSED_PARAM( _type_, _name_ ) ELA_MACRO_START      \
  _type_ __tmp1 = (_name_);                                     \
  _type_ __tmp2 = __tmp1;                                       \
  __tmp1 = __tmp2;                                              \
ELA_MACRO_END

typedef struct
{
}
spinlock_t;
#define SPIN_LOCK_UNLOCKED (spinlock_t) { }
#define DEFINE_SPINLOCK(x) spinlock_t x

#define spin_lock_init(lock)             \
ELA_MACRO_START;                         \
ELA_UNUSED_PARAM(spinlock_t *, lock);    \
ELA_MACRO_END

#define spin_lock(lock)                  \
ELA_MACRO_START;                         \
ELA_UNUSED_PARAM(spinlock_t *, lock);    \
ELA_MACRO_END

#define spin_unlock(lock)                \
ELA_MACRO_START;                         \
ELA_UNUSED_PARAM(spinlock_t *, lock);    \
ELA_MACRO_END

#define spin_lock_bh(lock)               \
ELA_MACRO_START;                         \
ELA_UNUSED_PARAM(spinlock_t *, lock);    \
ELA_MACRO_END

#define spin_unlock_bh(lock)             \
ELA_MACRO_START;                         \
ELA_UNUSED_PARAM(spinlock_t *, lock);    \
ELA_MACRO_END

#endif /* __ELA_SPIN_LOCK_H__ */
